<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">











<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>NPanday :: WiX Maven Plugin - Candle Mojo Usage</title>
    <style type="text/css" media="all">
      @import url("../css/maven-base.css");
      @import url("../css/maven-theme.css");
      @import url("../css/site.css");
    </style>
    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print" />
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
      </head>
  <body class="composite">
    <div id="banner">
                    <span id="bannerLeft">
    
            NPanday :: WiX Maven Plugin
    
            </span>
                    <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="breadcrumbs">
          
  

  
    
  
  
    
            <div class="xleft">
        Last Published: 2010-07-16
                      </div>
            <div class="xright">            <a href="../">NPanday :: WiX Maven Plugin</a>
            
  

  
    
  
  
    
  </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
    <div id="leftColumn">
      <div id="navcolumn">
           
  

  
    
  
  
    
                             <h5>Project Documentation</h5>
            <ul>
              
                
              
      
            
      
              
        <li class="collapsed">
                    <a href="../project-reports.html">Project Reports</a>
                </li>
          </ul>
                                           <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
            <img alt="Built by Maven" src="../images/logos/maven-feather.png"></img>
          </a>
                       
  

  
    
  
  
    
        </div>
    </div>
    <div id="bodyColumn">
      <div id="contentBox">
        <div class="section"><h2>Candle Mojo Usage</h2>
<p>Brief examples on how to use the candle goal.</p>
<div class="section"><h3>The <tt>candle</tt> mojo</h3>
<p>If you want to convert a WiX Source (.wxs) file into a WiX Object (.wixobj) file, use this configuration in your pom:</p>
<div class="source"><pre>&lt;project&gt;
  ...
  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;npanday.plugin&lt;/groupId&gt;
        &lt;artifactId&gt;wix-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
        &lt;configuration&gt;
          &lt;sourceFiles&gt;
            &lt;sourceFile&gt;Sample.wxs&lt;/sourceFile&gt;
          &lt;/sourceFiles&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  ...
  &lt;/build&gt;
...
&lt;/project&gt;</pre>
</div>
<p>Generally this will be done in a separate module with pom packaging.</p>
<p>You can also configure the output directory, and add an execution so that the plugin runs automatically during the build. By default it will run in the <tt>package</tt> phase.</p>
<div class="source"><pre>      &lt;plugin&gt;
        &lt;groupId&gt;npanday.plugin&lt;/groupId&gt;
        &lt;artifactId&gt;wix-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
        &lt;configuration&gt;
          &lt;sourceFiles&gt;
            &lt;sourceFile&gt;src/main/wix/IT005.wxs&lt;/sourceFile&gt;
          &lt;/sourceFiles&gt;
          &lt;outputDirectory&gt;target&lt;/outputDirectory&gt;
        &lt;/configuration&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;id&gt;wix&lt;/id&gt;
            &lt;goals&gt;
              &lt;goal&gt;candle&lt;/goal&gt;
            &lt;/goals&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;</pre>
</div>
</div>
</div>

      </div>
    </div>
    <div class="clear">
      <hr/>
    </div>
    <div id="footer">
      <div class="xright">&#169;  
          2010
    
          NPanday
          
  

  
    
  
  
    
  </div>
      <div class="clear">
        <hr/>
      </div>
    </div>
  </body>
</html>
